package com.treemanage.treemanageback.service.impl;

import com.treemanage.treemanageback.mapper.LoginMapper;
import com.treemanage.treemanageback.pojo.User;
import com.treemanage.treemanageback.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 实现类
 */
@Service
public class LoginServiceImp implements LoginService {
    @Autowired
    private LoginMapper mapper;

    @Override
    public User findUserByUsername(String username) {
        User u = mapper.findByName(username);
        return u;
    }

    @Override
    public void add(String  username, String password, String email, String phone) {
        mapper.add(username, password, email, phone);
    }


}
